﻿using Sirenix.OdinInspector;
using System;
using TMPro;
using UnityEngine;
using UnityEngine.UI;

namespace TowerDefence_Zombie
{
    public class TreasureProItem : MonoBehaviour
    {
        [SerializeField, Title("物品Icon")] private Image icon;
        [SerializeField, Title("物品名称")] private TextMeshProUGUI name;
        [SerializeField, Title("物品数量")] private TextMeshProUGUI count;

        public void SetItem(string propIconRes, string propName, int propCount)
        {
            icon.sprite = Resources.Load<Sprite>(propIconRes);
            name.text = propName;
            count.text = $" X{propCount}";
        }
    }
}
